#ifndef ZFRAMEWORKS_H_
#define ZFRAMEWORKS_H_

#include "GlobalDefines.h"
#include "ZSingleton.h"
#include "../Tools/ConfigManager.h"
#include "../Tools/ZLogManager.h"
#include "../Common/ZAppManager.h"
#include "../Render/RenderSystem.h"
#include "../Scene/ZDataManager.h"
#include "../Render/ShaderSystem.h"
#include "../MachineLearning/ImageFeatureManager.h"

GLOBAL_NAMESPACE_BEGIN

class ZFrameworks : public Singleton < ZFrameworks >
{
public:
    ZFrameworks(const std::string& configFileName="../Material/zframework.xml", const std::string& logFileName="./zframework.log");
    ~ZFrameworks();

    void init();

private:
    void destroy();
    void parserConfigFile();

private:
    std::string logFileName_;
    std::string configFileName_;
    std::string configIniFileName_;

private:
    std::auto_ptr<LogManager> logManager_;
    std::auto_ptr<AppManager> appManager_;
    std::auto_ptr<RenderSystem> renderSystem_;
    std::auto_ptr<DataManager> dataManager_;
    std::auto_ptr<ConfigManager> configManager_;
    std::auto_ptr<ImageFeatureManager> imageFeatureManager_;
#ifdef RENDER_OPENGL
    std::auto_ptr<ShaderSystem> shaderSystem_;
#endif
};

GLOBAL_NAMESPACE_END

#endif//ZFRAMEWORKS_H_